layui.use(['common','layer','table','form',],function(){
	var $ = layui.$,
    	layer = layui.layer,
    	form = layui.form,
    	common = layui.common,
    	table = layui.table;
	
	
	var id = GetQueryString("id");
	$.post("/systemsetup/permissionsmanage/user/selectAdminUserById",{id:id},function(result){
		$("#username").val(result.data["username"]);
		$("#realname").val(result.data["realname"]);
		$("#avatarsrc").attr('src',result.data["avatar"]); 
		$("#phone").val(result.data["phone"]);
		 $("#email").val(result.data["email"]);
	    $("input[name='sex'][value="+result.data["sex"]+"]").prop("checked", true);
	    form.render('radio');
	});
	//监听提交
    form.on('submit(userDtail)', function(data){
    		parent.layer.closeAll();
	   
	   return false;
    });
	
});